import { NumBooleanEnum } from '@/utils/constants';
import { ProFormColumnsType } from '@ant-design/pro-components';

const columns: ProFormColumnsType<any>[] = [
  {
    title: '会员用户名',
    dataIndex: 'name',
    formItemProps: {
      rules: [
        {
          required: true,
          message: '此项为必填项',
        },
      ],
    },
  },
  {
    title: '会员等级',
    dataIndex: 'member_role_id',
    valueType: 'memberRolePicker',
    formItemProps: {
      rules: [
        {
          required: true,
          message: '此项为必填项',
        },
      ],
    },
  },
  {
    title: '联系电话',
    dataIndex: 'phone',
    formItemProps: {
      rules: [
        {
          required: true,
          message: '此项为必填项',
        },
      ],
    },
  },
  {
    title: '黑名单',
    dataIndex: 'is_active',
    valueType: 'select',
    valueEnum: NumBooleanEnum,
  },
];
export const CreateColumns = columns;
export const UpdateColumns = columns;
